import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'HomeView',
    component: () => import('@/views/HomeView')
  },
  // 运行 分 析
  {
    path: '/run-ana',
    name: 'RunAna',
    component: () => import('@/views/RunAna'),
    children: [
      {
        path: 'real-time',
        component: () => import('@/views/RunAna/RealTime')
      },
      {
        path: 'data-ana',
        component: () => import('@/views/RunAna/DataAna')
      }
    ]
  },
  // 能 效 分 析
  {
    path: '/eff-ana',
    name: 'EffAna',
    component: () => import('@/views/EffAna'),
    children: [
      {
        path: 'over-all',
        component: () => import('@/views/EffAna/OverAll')
      },
      {
        path: 'coller',
        component: () => import('@/views/EffAna/Cooler')
      },
      {
        path: 'water-pump',
        component: () => import('@/views/EffAna/WaterPump')
      },
      {
        path: 'cold-tower',
        component: () => import('@/views/EffAna/ColdTower')
      }
    ]

  },
  // 故 障 诊 断
  {
    path: '/fault-dia',
    name: 'FaultDia',
    component: () => import('@/views/FaultDia')
  },
  // 状 态 评 价
  {
    path: '/run-eva',
    name: 'RunEva',
    component: () => import('@/views/RunEva'),
    children: [
      {
        path: 'timely',
        component: () => import('@/views/RunEva/Timely')
      },
      {
        path: 'delayed',
        component: () => import('@/views/RunEva/Delayed')
      }
    ]
  },

  // 设备管理
  {
    path: '/equ-manage',
    name: 'EquManage',
    component: () => import('@/views/EquManage')
  },
  // 高级
  {
    path: '/senior',
    name: 'Senior',
    component: () => import('@/views/Senior'),
    children: [
      {
        path: 'artificial',
        name: 'Artificial',
        component: () => import('@/views/Senior/Artificial')
      },
      {
        path: 'control',
        name: 'Control',
        component: () => import('@/views/Senior/Control')
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
